package com.simple.modules.sys.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.simple.modules.sys.entity.SysUserRoleEntity;

import java.util.List;


/**
 * 用户与角色对应关系
 *
 *
 */
public interface SysUserRoleService extends IService<SysUserRoleEntity> {
	
	void saveOrUpdate(Long userId, List<Integer> roleIdList);
	
	/**
	 * 根据用户ID，获取角色ID列表
	 */
	List<Integer> queryRoleIdList(Long userId);

    Boolean checkIsAdmin(Long userId);

    List<SysUserRoleEntity> getByUserId(Long userId);

	void deleteByRoleIdList(List<Integer> roleIds);
}
